package it.hopeless.jee6.persistence;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

import java.io.Serializable;

@ManagedBean(name = "persistence")
@ViewScoped
public class PersistenceController implements Serializable{
    private final static Logger logger = LoggerFactory.getLogger(PersistenceController.class);

    @EJB
    private PersistenceService persistenceService;

    public void createBook() {
        persistenceService.createBook();
    }

    public void deleteBook() {
        persistenceService.deleteBook();
    }
}